<div ng-controller="z-salaryDetail-c" z-loading is-loading="viewModel.isLoading">
    <div viewstack class="carousel slide" data-ride="carousel">
        <div class="carousel-inner" role="listbox">
            <div class="item active">
                <div class="row">
                    <div class="col-lg-12 heading">
                        <ul id="crumb" class="breadcrumb">
                            <li>
                                <i class="im-home"></i>
                                <a href="index.html">首页</a>
                            </li>
                            <li ng-repeat="menu in viewModel.menuList">
                                <i class="{{menu.icons}}" ng-if="$index+1!=viewModel.menuList.length"></i>
                                <i class="en-arrow-right7" ng-if="$index+1==viewModel.menuList.length"></i>
                                {{menu.label}}
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="outlet">
                    <div class="panel-body">
                        <form class="form-horizontal group-border hover-stripped" role="form" name="form">
                            <div class="row">
                                <!-- 检索条件 -->
                                <div class="col-xs-12 col-sm-10 col-md-11 form-box">
                                    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
                                        <div class="col-sm-5 col-md-5 form-title">公司：</div>
                                        <div class="col-sm-7 col-md-7 form-input">
                                            <div class="input-group">
                                                <select id="sldCorporation" multiple="multiple" class="form-control"
                                                        ng-model="viewModel.corporationList" tabIndex="1">
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
                                        <div class="col-sm-5 col-md-5 form-title">部门：</div>
                                        <div class="col-sm-7 col-md-7 form-input">
                                            <div class="input-group">
                                                <select id="sldDepartmentName" multiple="multiple" class="form-control"
                                                        ng-model="viewModel.departmentList" tabIndex="2">
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
                                        <div class="col-sm-5 col-md-5 form-title">员工：</div>
                                        <div class="col-sm-7 col-md-7 form-input">
                                            <div class="input-group">
                                                <textarea ng-model="viewModel.employeeNo" placeholder="员工号、中文名称、英文名称"
                                                          class="form-control elastic __web-inspector-hide-shortcut__"
                                                          rows="1"></textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
                                        <div class="col-sm-5 col-md-5 form-title">员工级别：</div>
                                        <div class="col-sm-7 col-md-7 form-input">
                                            <div class="input-group">
                                                <select id="sldlevel" multiple="multiple" class="form-control"
                                                        ng-model="viewModel.employeeLevelList" tabIndex="4">
                                                    <option value="13">13</option>
                                                    <option value="14">14</option>
                                                    <option value="15">15</option>
                                                    <option value="16">16</option>
                                                    <option value="17">17</option>
                                                    <option value="18">18</option>
                                                    <option value="19">19</option>
                                                    <option value="20">20</option>
                                                    <option value="21">21</option>
                                                    <option value="22">22</option>
                                                    <option value="23">23</option>
                                                    <option value="24">24</option>
                                                    <option value="25">25</option>
                                                    <option value="26">26</option>
                                                    <option value="27">27</option>
                                                    <option value="28">28</option>
                                                    <option value="29">29</option>
                                                    <option value="30">30</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-12 col-sm-10 col-md-11 form-box">
                                    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
                                        <div class="col-sm-5 col-md-5 form-title">开始日期：</div>
                                        <div class="col-sm-7 col-md-7 form-input">
                                            <div class="input-group" ng-class="{ 'has-error' : form.reportStratDate.$invalid && !form.reportStratDate.$pristine }">
                                                <input name="startDate"
                                                       ng-model="viewModel.startDate"
                                                       class="form-control datetime-picker"
                                                       type="text"
                                                       autofocus="autofocus"
                                                       maxLength="10"
                                                       ng-click="viewModel.startDateOpen($event)"
                                                       z-datepicker-popup="{{viewModel.format}}"
                                                       is-open="viewModel.startDateOpened"
                                                       datepicker-options="viewModel.dateOptions"
                                                       close-text="Close"
                                                       readonly
                                                       tabIndex="8"><!--required-->
                                                <span class="input-group-addon cursorPointer" ng-click="viewModel.startDateOpen($event)"><i class="fa-calendar"></i></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
                                        <div class="col-sm-5 col-md-5 form-title">结束日期：</div>
                                        <div class="col-sm-7 col-md-7 form-input">
                                            <div class="input-group" ng-class="{ 'has-error' : form.reportEndDate.$invalid && !form.reportEndDate.$pristine }">
                                                <input name="endDate"
                                                       ng-model="viewModel.endDate"
                                                       class="form-control datetime-picker"
                                                       type="text"
                                                       autofocus="autofocus"
                                                       maxLength="10"
                                                       ng-click="viewModel.endDateOpen($event)"
                                                       z-datepicker-popup="{{viewModel.format}}"
                                                       is-open="viewModel.endDateOpened"
                                                       datepicker-options="viewModel.dateOptions"
                                                       close-text="Close"
                                                       readonly
                                                       tabIndex="9"><!--required-->
                                                <span class="input-group-addon cursorPointer" ng-click="viewModel.endDateOpen($event)"><i class="fa-calendar"></i></span>
                                             </div>
                                         </div>
                                    </div>
                                    <div class="col-sm-6 col-md-4 col-lg-1 form-item">
                                        <div class="col-xs-12 col-sm-2 col-md-1">
											<button type="button" class="btn btn-success" ng-click="viewModel.search()"  tabIndex="10">搜索</button>
										</div>
                                    </div>
									<div class="col-sm-4 col-md-4 col-lg-5 form-item">
                                  		<div class="col-sm-3 col-md-4 form-title" style="margin-left: 27px;">保存明细：</div>
                                        <div class="col-sm-7 col-md-6 form-input">
                                               <select name="historyDate"
                                                       ng-model="viewModel.historyDate"
                                                       ng-change="viewModel.changeHistory()"
                                                       class="form-control">
                                                   <option value=""></option>
                                                   <!-- <option ng-repeat="x in viewModel.historyMonths track by x.value" value="{{x.value}}">{{x.lable}}</option> -->
                                              		<option ng-repeat="historyMonths in viewModel.historyMonths" ng-selected="viewModel.historyDateSelected(historyMonths.value)" value="{{historyMonths.value}}">{{historyMonths.lable}}</option>
                                               </select>
                                         </div> 
                                         <div class="col-xs-12 col-sm-2 col-md-1">
											<button type="button" class="btn btn-danger btn-sm" ng-disabled="viewModel.deleteDisabled" ng-click="viewModel.deleteHistoryDate()" >删除</button>
									 	</div>
                                    </div>                                    
		                        </div>
                                <div class="col-xs-12 col-sm-10 col-md-11 form-box"> <!-- col-sm-8 col-md-3 form-input form-btns  -->
                                    <div class="col-sm-6 col-md-4 col-lg-8 form-item">
                                        <button id="dLabel" class="btn btn-lime"
                                                ng-click="viewModel.salaryButton($event)" type="button"
                                                data-toggle="dropdown" aria-haspopup="true"
                                                style="margin-left: 0px"
                                                aria-expanded="false" style="height:32px;">筛选<span
                                                class="caret"></span>
                                        </button>
                                        
                                        <ul class="salaryUl" ng-show="viewModel.ulShow">
                                            <li ng-repeat="salary in viewModel.checkList">
                                            	<input type="checkbox"	ng-checked="1"
                                                      		ng-click="viewModel.checkbox(salary.dicId)">{{salary.dicName}}
                                            </li>
                                        </ul>
                                        <button type="button" class="btn btn-success"
                                                ng-click="viewSalaryImportModel.Load()" tabIndex="12">导入
                                        </button>
                                        <button type="button" class="btn btn-success"
                                                ng-click="viewModel.exportDataPop2()" tabIndex="13">导出
                                        </button>    
                                        <button type="button" class="btn btn-primary"
	                                                ng-click="viewModel.saveDataPop()" tabIndex="14">保存
                                      	 </button>
                                         <button type="button" class="btn btn-warning"
                                               ng-click="viewModel.saveSnsPop()" tabIndex="14">提交
                                         </button>                             
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="outlet">
                    <div style="overflow-x: auto;">
                        <!-- col-lg-12 start here -->
                        <table class="table table-striped table-bordered" cellspacing="0" id="salary-table"
                               style="width:100%;">
                            <thead class="salary-scroll">
                            <tr>
                                <th class="thead1" colspan="13">基本信息</th>
                                <th class="thead2" colspan="1">工作日历明细</th>
                                <th class="thead3" colspan="6">考勤异常明细</th>
                                <th class="thead4" colspan="3">加班明细(天)</th>
                                <th class="thead5" colspan="10">请假明细(天)</th>
                                <th class="thead6" colspan="1"></th>
                            </tr>

                            <tr class="salary-tr-1">
                                <th ng-show="viewModel.checkbox1">
                                    <div>一级架构</div>
                                </th>
                                <th ng-show="viewModel.checkbox2">
                                    <div>二级架构</div>
                                </th>
                                <th ng-show="viewModel.checkbox3">
                                    <div>三级架构</div>
                                </th>
                                <th ng-show="viewModel.checkbox4">
                                    <div>四级架构</div>
                                </th>
                                <th>
                                    <div>项目组</div>
                                </th>
                                <th ng-show="viewModel.checkbox5">
                                    <div>工号</div>
                                </th>
                                <th ng-show="viewModel.checkbox6">
                                    <div>中文名</div>
                                </th>
                                <th ng-show="viewModel.checkbox7">
                                    <div>英文名</div>
                                </th>
                                <th>
                                    <div>性别</div>
                                </th>
                                <th>
                                    <div>员工级别</div>
                                </th>
                                <th ng-show="viewModel.checkbox8">
                                    <div>岗位</div>
                                </th>
                                <th ng-show="viewModel.checkbox9">
                                    <div>入职日期</div>
                                </th>
                                <th ng-show="viewModel.checkbox10">
                                    <div>离职日期</div>
                                </th>
                                <th ng-show="viewModel.checkbox11">
                                    <div style="width: 90px;">应出勤天数</div>
                                </th>
                                <th ng-show="viewModel.checkbox13">
                                    <div>迟到次数</div>
                                </th>
                                <th ng-show="viewModel.checkbox14">
                                    <div>迟到扣款</div>
                                </th>
                                <th ng-show="viewModel.checkbox15">
                                    <div>早退次数</div>
                                </th>
                                <th ng-show="viewModel.checkbox16">
                                    <div>早退扣款</div>
                                </th>
                                <th ng-show="viewModel.checkbox17">
                                    <div>旷工次数</div>
                                </th>
                                <th ng-show="viewModel.checkbox18">
                                    <div>补签次数</div>
                                </th>
                                <th ng-show="viewModel.checkbox19">
                                    <div>平日加班</div>
                                </th>
                                <th ng-show="viewModel.checkbox20">
                                    <div>双休加班</div>
                                </th>
                                <th ng-show="viewModel.checkbox21">
                                    <div>节日加班</div>
                                </th>
                                <th ng-show="viewModel.checkbox22">
                                    <div>年假</div>
                                </th>
                                <th ng-show="viewModel.checkbox23">
                                    <div>调休</div>
                                </th>
                                <th ng-show="viewModel.checkbox24">
                                    <div>事假</div>
                                </th>
                                <th ng-show="viewModel.checkbox25">
                                    <div>病假</div>
                                </th>
                                <th ng-show="viewModel.checkbox26">
                                    <div>婚假</div>
                                </th>
                                <th ng-show="viewModel.checkbox27">
                                    <div>产假</div>
                                </th>
                                <th ng-show="viewModel.checkbox28">
                                    <div>产检</div>
                                </th>
                                <th ng-show="viewModel.checkbox29">
                                    <div>陪护假</div>
                                </th>
                                <th ng-show="viewModel.checkbox30">
                                    <div>哺乳假</div>
                                </th>
                                <th ng-show="viewModel.checkbox31">
                                    <div>丧假</div>
                                </th>
                                <th ng-show="viewModel.checkbox32" >
                                    <div style="width:150px;">备注</div>
                                </th>
                            </tr>
                            </thead>

                            <!--  与thead对应 待定-->
                            <tbody class="salary-scroll-body">
                            <tr ng-repeat="salaryDetail in viewModel.dataList">
                                <td ng-show="viewModel.checkbox1">
                                    <div>{{salaryDetail.deptmentNameOne}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox2">
                                    <div>{{salaryDetail.deptmentNameTwo}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox3">
                                    <div>{{salaryDetail.deptmentNameThree}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox4">
                                    <div>{{salaryDetail.deptmentNameFour}}</div>
                                </td>
                                <td><div>{{salaryDetail.deptmentNameFive}}</div></td>
                                <td ng-show="viewModel.checkbox5">
                                    <div>{{salaryDetail.employeeNo}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox6">
                                    <div>{{salaryDetail.chineseName}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox7">
                                    <div>{{salaryDetail.englishName}}</div>
                                </td>
                                <td>
                                    <div>
                                    	<span ng-if="salaryDetail.sex==1">男</span>	
                                        <span ng-if="salaryDetail.sex==2">女</span>
                                    </div>
                                </td>
                                <td>
                                    <div>{{salaryDetail.level}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox8">
                                    <div>{{salaryDetail.roleName}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox9">
                                    <div>{{salaryDetail.entryDate | date:'yyyy/MM/dd'}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox10">
                                    <div>{{salaryDetail.employeeSeparatedDate | date:'yyyy/MM/dd'}}</div>
                                </td>
                                <td ng-show="viewModel.checkbox11" ext-Class="w90"
                                    z-cell-editor row="salaryDetail" col="'beAttendanceDays'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <!-- <td ng-show="viewModel.checkbox12"><div>{{reportTimeDetail.legalAttendanceDays}}</div></td> -->
                                <td ng-show="viewModel.checkbox13"
                                    z-cell-editor row="salaryDetail" col="'lateCount'" on-Change-Number="viewModel.changNumber(salaryDetail)"
                                   >
                                    <!--<div>{{salaryDetail.lateCount}}</div>-->
                                </td>
                                <td ng-show="viewModel.checkbox14"
                                    z-cell-editor row="salaryDetail" col="'lateMoney'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox15"
                                    z-cell-editor row="salaryDetail" col="'leaveEarlyCount'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox16"
                                    z-cell-editor row="salaryDetail" col="'leaveEarlyMoney'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox17"
                                    z-cell-editor row="salaryDetail" col="'absentCount'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox18"
                                    z-cell-editor row="salaryDetail" col="'retroactiveCount'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox19"
                                    z-cell-editor row="salaryDetail" col="'overtimeNomal'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox20"
                                    z-cell-editor row="salaryDetail" col="'overtimeWeekend'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox21"
                                    z-cell-editor row="salaryDetail" col="'overtimeHoliday'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox22"
                                    z-cell-editor row="salaryDetail" col="'restYearUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox23"
                                    z-cell-editor row="salaryDetail" col="'restTuneUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox24"
                                    z-cell-editor row="salaryDetail" col="'restThingUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox25"
                                    z-cell-editor row="salaryDetail" col="'restIllUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox26"
                                    z-cell-editor row="salaryDetail" col="'restMarryUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox27"
                                    z-cell-editor row="salaryDetail" col="'restBornUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox28"
                                    z-cell-editor row="salaryDetail" col="'restCheckUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox29"
                                    z-cell-editor row="salaryDetail" col="'restBornAttendUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox30"
                                    z-cell-editor row="salaryDetail" col="'restSuckleUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox31"
                                    z-cell-editor row="salaryDetail" col="'restDieUsed'" on-Change-Number="viewModel.changNumber(salaryDetail)">
                                </td>
                                <td ng-show="viewModel.checkbox32">
                                    <!-- <div>{{salaryDetail.description}}</div> -->
                                    <input class="form-control"
			  							   ng-model="salaryDetail.description" ng-disabled="viewModel.disabledDesc(salaryDetail)" ng-change="viewModel.changeDesc(salaryDetail)" maxLength="45" title="{{salaryDetail.description}}">
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="row" style="padding-left: 15px;">
                        <div z-Pagination total-Data='viewModel.totalData'
                             per-Page='viewModel.perPage'
                             current-Page='viewModel.rowCount'
                             on-Click="viewModel.changePage()"
                             on-Change-Per-Page="viewModel.changePage()"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <z-Dialog show-Save-Btn="true"
              have-Error-Class="false"
              load-Url="static/html/salary/selectPop.html"
              title="{{selectModel.title}}"
              show="selectModel.showSubmit"
              cancel-fn="viewModel.unLoadPop()"
              save-fn="viewModel.savePop()"
              body-Height="400"></z-Dialog>

   <!--  <z-Dialog show-Submit-Btn="false"
              show-Save-Btn="true"
              have-Error-Class="false"
              load-Url="static/html/salary/selectPop2.html"
              title="{{selectModel.title}}"
              show="selectModel.showSave"
              cancel-fn="viewModel.unLoadPop()"
              save-fn="viewModel.savePop()"
              body-Height="150"></z-Dialog> -->

    <z-Dialog show-Submit-Btn="false"
              show-Save-Btn="true"
              have-Error-Class="false"
              load-Url="static/html/salary/selectPop3.html"
              title="{{selectModel.title}}"
              show="selectModel.showExport"
              confirm-Btn-Txt="导出"
              cancel-fn="viewModel.unLoadPop()"
              save-fn="viewModel.savePop()"
              body-Height="400"></z-Dialog>
    <z-Dialog show-Save-Btn="false"
              have-Error-Class="false"
              load-Url="static/html/salary/import.html"
              title="工资报表导入"
              show="viewSalaryImportModel.show"
              cancel-fn="viewSalaryImportModel.unLoad()"
              save-fn="viewSalaryImportModel.save()"
              body-Height="81"></z-Dialog>
</div>
